<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>判断能否跨域访问node服务</title>
  </head>
  <body>
    <script>
      fetch('http://localhost:3000/api/login', {
        method: 'POST',
      })
        .then(response => response.json())
        .then(data => console.log(data))
        .catch(error => console.error('Request error:', error))
    </script>
  </body>
</html>
